function construct_plot_graph(container, inodes, iedges){
	config = {
              //container: '#cy' + container,
              container: container,
	      nodeImageH: 50,
              nodeImageW: 50,
              maxNodeSize: 240,
              labelMaxLength: 13,
              referenceNodeColor: "#C4BA2B",
              //width: function() { return $(this.container).width(); },//$(window).width() * 0.7 - 50,
              height: $(window).height() *0.95 - 25,
              // opacities used for fading and returning back
              link_def_opacity: 0.6,
              link_hover_opacity: 1.0,
              node_def_opacity: 1.0,
              node_hover_opacity: 0.1,
              node_hover_duration: 300,
              nodeTextColor: "black", //"#999396",
              linkDefaultColor: '#000000',
              linkSelectedColor: "#FFD700",
            };
            var sources = _.map( _.unique(nodes, false, function(ele) { return ele.data.source; } ), function(ele) { return ele.data.source } );
            var timer;
            // @global
	var cyo = $(config.container).cytoscape(
            {
                elements: { "nodes": inodes, "edges": iedges },
                layout: {
                    name: "arbor",
                    liveUpdate: true,
                    maxSimulationTime: 3000,
                    precision: 0.6,
                    ungrabifyWhileSimulating: true,
                    gravity: true,
                    fit: true,
                    stepSize: 0.5,
                    friction: 0.4,
                    stableEnergy: function( energy ){
                        var e = energy;
                        return (e.max <= 0.1) || (e.mean <= 0.1);
                    }
                },
                panningEnabled: false,
                zoomingEnabled: false,
                zoom: 0.5,
                style: cytoscape.stylesheet()
                .selector("node")
                .css({
                    "color": "data(lcolor)",
                    "content": "data(label)",
                    "source": "data(source)",
                    "text-valign": "center",
                    "text-halign": "center",
                    "border-width": 1,
                    "border-color": "white",
                    "background-color": "data(col)",
                    "cursor": "pointer",
                    "shape": "data(shape)",
                    "height": "mapData(gene_interesting_score, 0, 50, 15, 40)",
                    "width": "mapData(gene_interesting_score, 0, 50, 15, 40)"
                })
		.selector("edge")
                .css({
                    "line-color": config.linkDefaultColor,
                    "opacity": config.link_def_opacity,
                    "visibility": "invisible",
                    "cursor": "pointer",
                    "width": "mapData(pvalue, 0, 5, 3, 8)"
                })
                .selector("edge[correlation < 0]")
                .css({
                    "source-arrow-shape": "none",
                    "target-arrow-shape": "tee",
                    "target-arrow-color": "#FF0000",
                })
                .selector("edge[correlation > 0]")
                .css({
                    "source-arrow-shape": "none",
                    "target-arrow-shape": "triangle",
                    "target-arrow-color": "#FF0000",
                })
                .selector("edge:selected")
                .css({
                "line-color": "purple",
                })
            })
            .css("background", "white")
            .cytoscape("get");

            cyo.nodes().on("mouseover", function(event)
            {
                if( timer )
                {
                    clearTimeout(timer);
                    timer = null;
                }
                var node = this;
                timer = setTimeout( function() {
                    var neighborhood = node.neighborhood();
                    // dim all except node & its neighborhood
                    $.each( cyo.elements(), function(ind,ele)
                    {
                        if( !_.contains(neighborhood, ele) && (ele !== node) )
                        {
                            ele.animate({
                                css: {opacity: config.node_hover_opacity}
                            },
                            { duration: config.node_hover_duration }
                            );
                        }
                    });
                }, 200);
            });
	cyo.nodes().on("select", function(){
                atom_clicked(this);
        });
            cyo.nodes().on("mouseout", function(event)
            {
                if( timer )
                {
                    clearTimeout(timer);
                    timer = null;
                }
                cyo.nodes().animate({
                    css: {opacity: config.node_def_opacity},
                },
                { duration: config.node_hover_duration }
                );
                cyo.edges().animate({
                    css: {opacity: config.link_def_opacity}
                },
                { duration: config.node_hover_duration }
                );
            });
            cyo.edges().on("mouseover", function(event)
            {
                if( timer )
                {
                    clearTimeout(timer);
                    timer = null;
                }
                var edge = this;
                timer = setTimeout( function() {
                    edge.animate({
                        css: {opacity: config.link_hover_opacity}
                    },
                    { duration: config.node_hover_duration }
                    );
                }, 200);
            });
            cyo.edges().on("mouseout", function(event)
            {
                if( timer )
                {
                    clearTimeout(timer);
                    timer = null;
                }
                var edge = this;
                edge.animate({
                    css: {opacity: config.link_def_opacity}
                },
                { duration: config.node_hover_duration }
                );
            });
	return cyo;
}
